package com.rico.kok.service;

import com.rico.kok.entity.Comment;
import com.rico.kok.mapper.CommentMapper;
import com.rico.kok.service.interf.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：Rico_Skipper(JinYang Han)
 * @Date：2022/5/3 16:13
 */
@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    CommentMapper commentMapper;

    @Override
    public int insertComment(Comment comment) {
        return commentMapper.insertComment(comment);
    }

    @Override
    public List<Comment> selectComment(Comment comment) {
        return commentMapper.selectComments(comment);
    }

    @Override
    public int updateComment(Comment comment) {
        return commentMapper.updateComment(comment);
    }

    @Override
    public int deleteComment(Comment comment) {
        return commentMapper.deleteComment(comment);
    }
}
